import { export_model } from '../services/api';

export default {
  namespace: 'drop',

  state: {
    oneTemplate: {},
    twoTemplate: {},
    threeTemplate: {},
  },

  effects: {
    // 保存第一级的模板
    *queryOne({ payload }, { call, put }) {
      console.log(payload);
      yield put({
        type: 'saveOneReducer',
        payload: payload,
      });
    }
  },

  reducers: {
    saveOneReducer(state, { payload }) {
      return {
        ...state,
        oneTemplate: payload,
      };
    },
  },
};
